<script>
import {UploadFilled} from "@element-plus/icons-vue";
import request from "@/utils/request";

export default {
  name: "BucketManage",
  props: {
    url: {
      type: String,
      default: "http://101.42.248.84:9066/files/upload/minio",
    },
    dialogShow: {
      default: false
    }
  }, components: {},
  methods: {
    dialogClose() {
      console.log("关闭")
      this.$emit("onClose");
    },
    isBucketSelected() {
      if (this.bucket == null || this.bucket == "") {
        this.$message.error("请先选择存储桶")
        return false;
      }
      return true;
    }
  },
  data() {
    return {
      urlPath: this.url,
      dialogV: this.dialogShow,
      bucket: "",
      bucketList: []
    }
  },
  watch: {
    dialogShow() {
      this.dialogV = this.dialogShow
    }
  },
  created() {
    request.get("/files/bucketList").then(res => {
      this.bucketList = res.data;
    })
  }
}
</script>

<template>

</template>

<style scoped>

</style>